<template>
	<view>
				

		<view v-if="lrCheckSample.length>0">
		<view  style="line-height: 100upx;padding: 0 20upx;font-size: 36upx;font-weight: 700;background-color: #fff;margin-top: 20upx;">
		调配设备明细</view>
			<view v-for="(item,index) in lrCheckSample" :key="index" style="margin-top: 20upx;">
				<view class="projectInfo ">

					<view class="eqdetail">
						<view class="eqtesxt">
							<view class="name">仪器设备名称</view>
							<view>{{item.fEquiprealname}}</view>
						</view>
						<view class="btn" @click="goDetail(item)">设备详情</view>
					</view>

					<!-- <fromItem title="仪器设备名称" :data="item.fEquiprealname" flex="left" nameColor="#989898"
						projectName="#343434">
					</fromItem> -->
					<fromItem title="型号/规格/等级" :data="item.fSize" flex="left" nameColor="#989898" projectName="#343434">
					</fromItem>




				</view>
				<view class="projectUnI" id="datePage">
					<view class="min-collapse">
						<view class="card">
							<view>
								<view class="contents" :class="isShow1 ? 'animation': 'show-list animation' "
									:style="{'height':isShow1? 1230+'upx' :'0'}">
									<view class="projectInfo">

										<fromItem title="固定资产编号" :data="item.fPropertyno" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>


										<fromItem title="购置时间" :data="item.fPurchasedates" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>
										<fromItem title="购置原值(元)" :data="item.fPrice" flex="left" nameColor="#989898"
											projectName="#343434">
										</fromItem>
										<fromItem title="已摊销金(元)" :data="item.fAmortizedcost" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>
										<fromItem title="设备余值(元)" :data="item.fRestcost" flex="left" nameColor="#989898"
											projectName="#343434">
										</fromItem>
										<fromItem title="调拨价格(元)" :data="item.fAllotcost" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>
										<fromItem title="维修费(元)" :data="item.fRepaircost" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>
										<fromItem title="装卸费(元)" :data="item.fLoadcost" flex="left" nameColor="#989898"
											projectName="#343434">
										</fromItem>
										<fromItem title="运输费(元)" :data="item.fTransfercost" flex="left"
											nameColor="#989898" projectName="#343434">
										</fromItem>
										<fromItem title="备注" :data="item.fNote" flex="left" nameColor="#989898"
											projectName="#343434" type="textarea">
										</fromItem>
										<fromItem title="存放位置" :data="item.fLocation" flex="left" nameColor="#989898"
											projectName="#343434" type="textarea">
										</fromItem>




									</view>

								</view>
							</view>
						</view>
						<view class="card-view retract icon" @click="test">
							<text class="iconfont next icon-fanhui" :class="[isShow1 ? 'retract_icon' : '']" />
						</view>
					</view>

				</view>
			</view>
		</view>
		<!-- <nodata v-else></nodata> -->
		
	</view>
</template>
<script>
	import nodata from '@/components/nodata/nodata.vue';
	import fromItem from '@/components/from-item/from-item.vue';
	export default {

		props: {
			lrCheckSample: {
				type: Array,
				default: function() {
					return []
				}
			},
			isShow: {
				type: Boolean,
				default: false
			},
			isShows: {
				type: Boolean,
				default: true
			},

			fileList: {
				type: Array,
				default: function() {
					return []
				}
			},

		},
		data() {
			return {
				page: false,

				// isShow: false,

				feild: 0,
				isShow1: this.isShow


			}
		},
		components: {
			fromItem,
			nodata
		},
		watch: {
			// 		fileList(e) {

			// 			if (e.length > 4) {
			// 				this.feild =
			// 					e.length % 4 === 0 ?
			// 					e.length / 4 :
			// 					Math.floor(e.length / 4 + 1);
			// 			} else if (e.length <= 4 && e.length > 0) {
			// 				this.feild = 1;
			// 			} else if (e.length == 0) {
			// 				this.feild = 0;
			// 			}
			// 		},


		},

		filters: {

			photoUrl(value, params) {


				var src = []
				if (value != undefined) {
					value.map((item) => {
						src.push(item.url)
					})
					return src
				}


			},
		},

		methods: {
			// 折叠
			test() {
				this.isShow1 = !this.isShow1
			},
			goProblem() {

				uni.navigateTo({
					url: `/pages/apply/supervisoryReview/check/problemPage?data=${JSON.stringify(this.lrCheckSample.problemItems)}&num=0`
				})
			},
			goDetail(item){
				console.log(item.fEquipid)
				uni.navigateTo({
					url:"/pages/apply/equipment/equipmentBase?id="+item.fEquipid
				})
			},
			goGrade() {



				var item = {
					item: this.lrCheckSample.items
				}


				uni.navigateTo({
					url: `/pages/apply/supervisoryReview/check/grade?item=${JSON.stringify(item)}&num=1`,
					success(res) {

					},
					fail(res) {

					}
				})
				// console.log(this.lrCheckSample.items)

			},

			pdfPage(name, url) {

				// console.log(123,name, url)
				var aa = url;
				let links = encodeURIComponent(aa);

				uni.navigateTo({
					url: '/pages/apply/pdf?links=' + links + '&names=' + name
				});
			},


		}
	}
</script>
<style lang="less">
	// @import '../../components/s-calendar/icon.css';
	@import (less) '@/static/lx-calendar/fonts/iconfont.css';
	@import "@/components/s-calendar/icon.css";
	@import (less) '@/static/lx-calendar/fonts/iconfont.css';





	// 文件
	.fileList {
		padding: 0px 15px;
		background-color: #fff;
	}

	.box {
		width: 100%;
		display: flex;
		flex-wrap: wrap;

		.file {
			height: 260upx;
			width: 22.8%;
			display: flex;
			flex-direction: column;
			margin-right: 20upx;
			margin-top: 10px;

			image {
				width: 100%;
				margin: 0 auto;
			}

			.text {
				font-size: 14px;
				width: 160upx;
				display: block;
				height: 65px;
				color: #1b2c79;
				line-height: 35px;
				text-align: center;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}
	}

	.file:nth-child(4n) {
		margin-right: 0px;
	}


	// 文件
	// 折叠
	.projectInfo {
		// border-bottom: 2upx solid #E7E7E7;
		margin-top: 20upx;
		// padding: 0 56upx;
		// background-color: #fff;
		width: 100%;
	}

	.min-collapse {
		width: 100%;

		.right-arrow {
			//p-left-10
			width: 24rpx;
			height: 24rpx;
			padding-top: 10rpx;
			transform: rotate(90deg);
			padding-left: 10rpx;
		}

		.right-arrow-a {
			transform: rotate(7deg);
		}

		.card {
			// box-shadow: 0 0 10px 4px #EEEEEE;

			.card-view {
				width: 100%;
				//min-flex min-flex-main-between f28
				display: flex;
				justify-content: center;
				font-size: 28rpx;
				padding: 0rpx;
				padding-bottom: 0;

			}
		}

		.contents {
			overflow: hidden;
			display: flex;
			// justify-content: flex-start;
			// flex-wrap: wrap;
			// max-height: 0;
			// padding: 0 20rpx;

			.statisticsMoudle {
				flex: 1;
				display: flex;
				justify-content: center;
				flex-direction: column;
				align-items: center;
				height: 60upx;
				margin: 50upx 0 0 0;
				border-right: 4upx solid #666666;

				.time {
					color: #333333;
					font-size: 40upx;
					font-weight: 700;
				}

				.text {
					color: #666666;
					font-size: 24upx;
					line-height: 40upx;
				}
			}

			.statisticsMoudle:last-child {
				border: none !important;
			}

			.chioce-date-item {
				// width: 112rpx;
				// height: 58rpx;


				font-size: 28rpx;
				text-align: center;

				display: block;
			}

			.chioce-date-item:nth-child(5n) {
				margin: 0;
			}

			.chioce-date-item-active {
				// width: 112rpx;
				// height: 58rpx;
				font-size: 28rpx;
				text-align: center;
			}

			.chioce-date-item-active:nth-child(5n) {
				margin: 0;
			}

			.m-right-20 {
				// margin-right: 35rpx;
				// margin-bottom: 20rpx;
			}
		}

		//在txt中修改左右间距，默认使用父组件外容器的边距
		.content-txt {
			overflow: hidden;
			display: flex;
			justify-content: flex-start;
			flex-wrap: wrap;
			max-height: 0;
			padding-left: 20rpx;
			padding-right: 20rpx;

			// padding-bottom: 20rpx;
			.txt {
				word-break: break-all;
				white-space: normal;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				// padding:0 20rpx;
				padding-bottom: 20rpx;
				font-size: 28rpx;
				font-weight: normal;
			}
		}

		.show-list {
			height: 0;
		}

		.show {
			max-height: 0;
			margin-bottom: 20rpx;
		}

		.animation {
			transition-property: all;
			transition-duration: 0.5s;
			transition-timing-function: ease;
		}
	}

	.projectUnI {
		// background-color: #FFF;
	}

	.icon-fanhui::before {
		content: "";
		color: #A7A7A7;
		font-weight: 700;
	}

	.icon {
		display: block;

		.next {
			transform: rotate(180deg);
			display: block;
		}
	}

	.retract {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 80rpx;
		background-color: #fff;
		border-top: 1rpx solid #eee;

		.iconfont {
			transform: rotate(270deg);

			&.retract_icon {
				transform: rotate(90deg);
			}
		}
	}

	.eqdetail {
		height: 100upx;
		line-height: 100upx;
		background-color: #fff;
		padding: 0 30upx;
		display: flex;
		justify-content: space-between;
		align-items: center;

		.eqtesxt {
			display: flex;
			padding-left: 30upx;
			font-size: 30upx;
			.name {
				color: rgb(152, 152, 152);
				padding-right: 15px;
				
			}
		}

		.btn {
			width: 200upx;
			height: 80upx;
			line-height: 80upx;
			text-align: center;
			border-bottom-color: rgb(255, 255, 255);
			background: linear-gradient(90deg, #209ec3, #0934a3);
			color: #fff;
			border-radius: 15upx;
			letter-spacing: 2upx;
			// font-weight: 600;
			font-size: 30upx;
		}
	}

	// 折叠
</style>
